const mysql = require('../db/mysql57');

const hospitalDao = {
    getAllProvince(reqId) {
        let sql = `select * from Province order by id`;
        return mysql.sqlExec(sql);
    },
    getCitysByProvinceId(reqId, provinceId) {
        let sql = `select id, name from City where provinceId = ? order by id`;
        let data = [ provinceId ];
        return mysql.sqlExec(sql, data);
    }
};

module.exports = hospitalDao;